home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / Text::Wrap.z / Text::Wrap
Encoding:
Text File  |  1998-10-30  |  1.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))                                                    TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Text::Wrap - line wrapping to form simple paragraphs
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.              use Text::Wrap
  13.  
  14.              print wrap($initial_tab, $subsequent_tab, @text);
  15.  
  16.              use Text::Wrap qw(wrap $columns);
  17.  
  18.              $columns = 132;
  19.  
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      _T_e_x_t::_W_r_a_p::_w_r_a_p() is a very simple paragraph formatter.  It formats a
  23.      single paragraph at a time by breaking lines at word boundries.
  24.      Indentation is controlled for the first line ($initial_tab) and all
  25.      subsquent lines ($subsequent_tab) independently.  $Text::Wrap::columns
  26.      should be set to the full width of your output device.
  27.  
  28. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  29.              print wrap("\t","","This is a bit of text that forms
  30.                      a normal book-style paragraph");
  31.  
  32.  
  33. BBBBUUUUGGGGSSSS
  34.      It's not clear what the correct behavior should be when _W_r_a_p() is
  35.      presented with a word that is longer than a line.  The previous behavior
  36.      was to die.  Now the word is split at line-length.
  37.  
  38. AAAAUUUUTTTTHHHHOOOORRRR
  39.      David Muir Sharnoff <muir@idiom.com> with help from Tim Pierce and
  40.      others.
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.